|
|
|
|
|
|
|
Case Is = dbInteger
FieldTypeName = "INTEGER"
Case Is = dbLong
FieldTypeName = "LONG"
Case Is = dbCurrency
FieldTypeName = "CURRENCY"
Case Is = dbSingle
FieldTypeName = "SINGLE"
Case Is = dbDouble
FieldTypeName = "DOUBLE"
Case Is = dbByte
FieldTypeName = "BYTE"
Case Is = dbLongBinary
FieldTypeName = "LONGBINARY"
Case Else
FieldTypeName = "UNKNOWN"
End Select
'
If fldObject.Attributes And dbAutoIncrField Then
FieldTypeName = "COUNTER"
End If
End Function |
|
|
|
|
|
|
|
|
Now that all the field work is done, it's time to build the indexes. Listing A.37 shows the code for the WrCreateIndex method. |
|
|
|
|
|
|
|
|
Listing A.37. Coding the WrCreateIndex function. |
|
|
|
|
|
|
|
|
Public Function WrCreateIndex(idxObject As Index, cTable As String) As String
'
' create index code line
'
Dim cTemp As String
Dim cIndex As String
Dim fldObject As Field
'
' ignore system table indexes
If UCase(Left(cTable, 4)) = "MSYS" Then
WrCreateIndex = ""
Exit Function
End If
'
If InStr(cTable, " ") <> 0 And Left(cTable, 1) <> "[" Then
cTable = "[" + cTable + "]"
End If |
|
|
|
|
|